<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<link rel="stylesheet" type="text/css" href="css/base.css" />
	<base href="<%=basePath%>">

	<title>Editar Excursion Dia Completo</title>
	
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
</head>
  
<body>
	<f:view>
		<h:form id="miniTourForm">
			
			<h:panelGrid border="0" columns="3">
				<h:outputText value="Nombre"></h:outputText>
				<h:inputText id="nombre" value="#{administrarExcursionesDiaCompletoBean.dataItem.nombre}" required="true" maxlength="20" size="20" />
				<h:message for="nombre"></h:message>

				<h:outputText value="Categoria"></h:outputText>
				<h:inputText id="categoria" value="#{administrarExcursionesDiaCompletoBean.dataItem.categoria}" required="true" maxlength="20" size="20" />
				<h:message for="categoria"></h:message>
				
				<h:outputLabel for="fechaExcursion" value="Fecha (dd/mm/aaaa): " />
				<h:inputText id="fechaExcursion" maxlength="10" size="10"
					value="#{administrarExcursionesDiaCompletoBean.dataItem.fecha}" required="true">
					<f:convertDateTime pattern="dd/MM/yyyy" />				
				</h:inputText>
				<h:message for="fechaExcursion" errorClass="error"></h:message>
				
				<h:outputText value="Precio Basico"></h:outputText>
				<h:inputText id="precioBasico" value="#{administrarExcursionesDiaCompletoBean.dataItem.precioBasico}" required="true" maxlength="20" size="20" />
				<h:message for="precioBasico"></h:message>	
					
				
				<h:outputText value="Costo Almuerzo"></h:outputText>
				<h:inputText id="costoAlmuerzo" value="#{administrarExcursionesDiaCompletoBean.dataItem.costoAlmuerzo}" required="false" maxlength="20" size="20" />
				<h:message for="costoAlmuerzo"></h:message>
				
				<h:outputText value="Costo Merienda"></h:outputText>
				<h:inputText id="costoMerienda" value="#{administrarExcursionesDiaCompletoBean.dataItem.costoMerienda}" required="false" maxlength="20" size="20" />
				<h:message for="costoMerienda"></h:message>
				
			</h:panelGrid>
				
				
				
				<script>			
					function mostrarPanel(radio) {
						var panelMT = document.getElementById('excursionForm:miniTour');
						var panelDC = document.getElementById('excursionForm:diaCompleto');
						var opcion = radio.value; 
																	
						if (opcion == "EMD"){
							panelMT.style.visibility="hidden";
							panelDC.style.visibility="hidden";
						}
						else if (opcion == "EMT"){
							panelMT.style.visibility="visible";
							panelDC.style.visibility="hidden";
						}	
						else if (opcion == "EDC"){
							panelMT.style.visibility="hidden";
							panelDC.style.visibility="visible";
						}	
						else {
							alert("Error: " + opcion);
						}   
						
					}
			   	</script>

				<br>
			
			<h:commandButton value="Guardar" action="#{administrarExcursionesDiaCompletoBean.guardar}"/>
			<h:commandButton value="Cancelar" action="#{administrarExcursionesDiaCompletoBean.volver}" immediate="true" />
		</h:form>
	</f:view>
</body>
</html>